import request from '@/utils/request'

// 查询分销加价列表
// export function listPrice(query) {
//   return request({
//     url: '/account/rprice/list',
//     method: 'get',
//     params: query
//   })
// }

// 新增分销加价
export function addPrice(data) {
  return request({
    url: '/account/rprice',
    method: 'post',
    data: data
  })
}
// 分销网配置列表
// /account/rprice/fxList
export function fxList(params) {
  return request({
    url: '/account/rprice/fxList',
    method: 'get',
    params
  })
}
// 删除一个分销网配置
export function delbyRetailKey(data) {
  return request({
    url: '/account/rprice/byRetailKey',
    method: 'post',
    data: data
  })
}
// 修改分销加价
// export function updatePrice(data) {
//   return request({
//     url: '/account/rprice',
//     method: 'put',
//     data: data
//   })
// }

// 删除分销加价
export function delPrice(id) {
  return request({
    url: '/account/rprice/' + id,
    method: 'delete'
  })
}

// 导出分销加价
export function exportPrice(query) {
  return request({
    url: '/account/rprice/export',
    method: 'get',
    params: query
  })
}
// 查询供货配置
export function getConfig(params) {
  return request({
    url: '/account/rprice/show',
    method: 'get',
    params
  })
}
// 查询供货商的商品数量
export function typeCount(data) {
  return request({
    url: 'goods/info/countForSupply',
    method: 'get',
    params:data
  })
}
// 删除一条分销货源配置
export function delConfig(id) {
	return request({
		url: `/account/rprice/${id}`,
		method: 'delete'
	})
}

// 编辑选号网关联店铺链接  编辑选号网页面设置
export function updateotherShopAddress(data) {
	return request({
		url: `/account/rprice/update/otherShopAddress  `,
		method: 'post',
    data

	})
}

//新增分销加价

export function addRprice(data) {
	return request({
		url: `/account/rprice/simple`,
		method: 'post',
    data
	})
}
//编辑分销加价
export function editRprice(data) {
	return request({
		url: `/account/rprice/simple`,
		method: 'put',
    data
	})
}
